home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / src / lib / geometry / transform3 / tm3tetrad.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-26  |  1.3 KB  |  52 lines

  1. /* Copyright (c) 1992 The Geometry Center; University of Minnesota
  2.    1300 South Second Street;  Minneapolis, MN  55454, USA;
  3.    
  4. This file is part of geomview/OOGL. geomview/OOGL is free software;
  5. you can redistribute it and/or modify it only under the terms given in
  6. the file COPYING, which you should have received along with this file.
  7. This and other related software may be obtained via anonymous ftp from
  8. geom.umn.edu; email: software@geom.umn.edu. */
  9.  
  10. /* Authors: Charlie Gunn, Pat Hanrahan, Stuart Levy, Tamara Munzner, Mark Phillips */
  11.  
  12. #include "transform3.h"
  13.  
  14. /*-----------------------------------------------------------------------
  15.  * Function:    Tm3Tetrad
  16.  * Description:    create a matrix with given vectors as rows
  17.  * Args:    T: the created matrix (OUTPUT)
  18.  *        x: row 1 (INPUT)
  19.  *        y: row 2 (INPUT)
  20.  *        z: row 3 (INPUT)
  21.  *        w: row 4 (INPUT)
  22.  * Returns:    nothing
  23.  * Author:    hanrahan, mbp
  24.  * Date:    Thu Aug  8 13:06:48 1991
  25.  * Notes:    
  26.  */
  27. void
  28. Tm3Tetrad( T, x, y, z, w )                
  29.     Transform3 T;
  30.     HPoint3 *x, *y, *z, *w;
  31. {
  32.     T[X][X] = x->x;
  33.     T[X][Y] = x->y;
  34.     T[X][Z] = x->z;
  35.     T[X][W] = x->w;
  36.  
  37.     T[Y][X] = y->x;
  38.     T[Y][Y] = y->y;
  39.     T[Y][Z] = y->z;
  40.     T[Y][W] = y->w;
  41.  
  42.     T[Z][X] = z->x;
  43.     T[Z][Y] = z->y;
  44.     T[Z][Z] = z->z;
  45.     T[Z][W] = z->w;
  46.  
  47.     T[W][X] = w->x;
  48.     T[W][Y] = w->y;
  49.     T[W][Z] = w->z;
  50.     T[W][W] = w->w;
  51. }
  52.